package com.xd.community.service;

import com.xd.community.service.Iservice.IFansService;
import com.xd.community.mapper.FansMapper;
import com.xd.community.model.entity.Fans;

import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 *
 * @date 2016/10/31
 */
@Service
public class FansServiceImpl implements IFansService {

  @Resource
  private FansMapper fansMapper;

  @Override
  public List<Fans> getFansList() {
    return fansMapper.selectFansList();
  }

  @Override
  public Fans getFansByopenid(String openid){
    return fansMapper.findFansByOpenID(openid);
  }

  @Override
  public boolean registerFans(Fans fans){
    return fansMapper.insertSelective(fans) != 0;
  }

}
